/* 
 * File:   Swap.h
 * Author: Gab'z
 *
 * Created on 5 juin 2012, 18:16
 */

#ifndef SWAP_H
#define	SWAP_H

#include "Operator.h"

namespace calculator {

    class Swap : public Operator {
        friend class CommandMap;

    public:
        std::string isExecutable() const;
        virtual ~Swap();

        virtual Swap* clone() const;

        const Memento* createMemento() const throw (CommandException);


    private:
        void eval(Stack * stack) const throw (CommandException);

        Swap(const std::string name);
        Swap(const Swap & orig);
    };
}

#endif	/* SWAP_H */

